package boogui.admin;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import javax.imageio.ImageIO;
import javax.swing.ComboBoxModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JSeparator;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.UIManager;
import javax.swing.border.EmptyBorder;
import javax.swing.border.EtchedBorder;
import javax.swing.filechooser.FileNameExtensionFilter;
import javax.swing.plaf.FontUIResource;

import boogui.member.S_FontSetting;
import boogui.movie.MovieSelectDAO;
import boogui.movie.MovieVO;

public class S_MovieRegistry extends JFrame {
	
	private BufferedImage image = null;
	private File selectedFile = null;
	
	private static S_MovieRegistry frame;

	private JPanel contentPane;
	private JTextField title;
	private JTextField genre;
	private JTextField textField_2;
	private JTextField actor1;
	private JTextField actor2;
	private JTextField actor3;
	private JTextField runningtime;
	private JTextField filename;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					//JFrame.setDefaultLookAndFeelDecorated(true);
					frame = new S_MovieRegistry();
					UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public S_MovieRegistry() {
		S_FontSetting.setUIFont(new FontUIResource("굴림", Font.PLAIN, 12));
		setTitle("영화 등록");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 500, 780);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);
		
		JPanel basicInfoP = new JPanel();
		contentPane.add(basicInfoP, BorderLayout.CENTER);
		GridBagLayout gbl_basicInfoP = new GridBagLayout();
		gbl_basicInfoP.columnWidths = new int[]{15, 0, 5, 0, 0, 0, 0, 0};
		gbl_basicInfoP.rowHeights = new int[]{35, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13, 0, 10, 0};
		gbl_basicInfoP.columnWeights = new double[]{0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, Double.MIN_VALUE};
		gbl_basicInfoP.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
		basicInfoP.setLayout(gbl_basicInfoP);
		
		JLabel lblNewLabel = new JLabel("제       목");
		lblNewLabel.setFont(new Font("맑은 고딕", Font.BOLD, 13));
		GridBagConstraints gbc_lblNewLabel = new GridBagConstraints();
		gbc_lblNewLabel.insets = new Insets(0, 0, 5, 5);
		gbc_lblNewLabel.gridx = 1;
		gbc_lblNewLabel.gridy = 1;
		basicInfoP.add(lblNewLabel, gbc_lblNewLabel);
		
		title = new JTextField();
		title.setMargin(new Insets(3, 3, 3, 3));
		GridBagConstraints gbc_title = new GridBagConstraints();
		gbc_title.gridwidth = 3;
		gbc_title.insets = new Insets(0, 0, 5, 5);
		gbc_title.fill = GridBagConstraints.HORIZONTAL;
		gbc_title.gridx = 3;
		gbc_title.gridy = 1;
		basicInfoP.add(title, gbc_title);
		title.setColumns(10);
		
		JLabel lblNewLabel_1 = new JLabel("장       르");
		lblNewLabel_1.setFont(new Font("맑은 고딕", Font.BOLD, 13));
		GridBagConstraints gbc_lblNewLabel_1 = new GridBagConstraints();
		gbc_lblNewLabel_1.insets = new Insets(0, 0, 5, 5);
		gbc_lblNewLabel_1.gridx = 1;
		gbc_lblNewLabel_1.gridy = 3;
		basicInfoP.add(lblNewLabel_1, gbc_lblNewLabel_1);
		
		genre = new JTextField();
		genre.setMargin(new Insets(3, 3, 3, 3));
		GridBagConstraints gbc_genre = new GridBagConstraints();
		gbc_genre.gridwidth = 3;
		gbc_genre.insets = new Insets(0, 0, 5, 5);
		gbc_genre.fill = GridBagConstraints.HORIZONTAL;
		gbc_genre.gridx = 3;
		gbc_genre.gridy = 3;
		basicInfoP.add(genre, gbc_genre);
		genre.setColumns(10);
		
		JLabel lblNewLabel_2 = new JLabel("감       독");
		lblNewLabel_2.setFont(new Font("맑은 고딕", Font.BOLD, 13));
		GridBagConstraints gbc_lblNewLabel_2 = new GridBagConstraints();
		gbc_lblNewLabel_2.insets = new Insets(0, 0, 5, 5);
		gbc_lblNewLabel_2.gridx = 1;
		gbc_lblNewLabel_2.gridy = 5;
		basicInfoP.add(lblNewLabel_2, gbc_lblNewLabel_2);
		
		textField_2 = new JTextField();
		textField_2.setMargin(new Insets(3, 3, 3, 3));
		GridBagConstraints gbc_textField_2 = new GridBagConstraints();
		gbc_textField_2.gridwidth = 3;
		gbc_textField_2.insets = new Insets(0, 0, 5, 5);
		gbc_textField_2.fill = GridBagConstraints.HORIZONTAL;
		gbc_textField_2.gridx = 3;
		gbc_textField_2.gridy = 5;
		basicInfoP.add(textField_2, gbc_textField_2);
		textField_2.setColumns(10);
		
		JLabel lblNewLabel_3 = new JLabel("배       우");
		lblNewLabel_3.setFont(new Font("맑은 고딕", Font.BOLD, 13));
		GridBagConstraints gbc_lblNewLabel_3 = new GridBagConstraints();
		gbc_lblNewLabel_3.insets = new Insets(0, 0, 5, 5);
		gbc_lblNewLabel_3.gridx = 1;
		gbc_lblNewLabel_3.gridy = 7;
		basicInfoP.add(lblNewLabel_3, gbc_lblNewLabel_3);
		
		actor1 = new JTextField();
		actor1.setMargin(new Insets(3, 3, 3, 3));
		GridBagConstraints gbc_actor1 = new GridBagConstraints();
		gbc_actor1.insets = new Insets(0, 0, 5, 5);
		gbc_actor1.fill = GridBagConstraints.HORIZONTAL;
		gbc_actor1.gridx = 3;
		gbc_actor1.gridy = 7;
		basicInfoP.add(actor1, gbc_actor1);
		actor1.setColumns(10);
		
		actor2 = new JTextField();
		actor2.setMargin(new Insets(3, 3, 3, 3));
		GridBagConstraints gbc_actor2 = new GridBagConstraints();
		gbc_actor2.insets = new Insets(0, 0, 5, 5);
		gbc_actor2.fill = GridBagConstraints.HORIZONTAL;
		gbc_actor2.gridx = 4;
		gbc_actor2.gridy = 7;
		basicInfoP.add(actor2, gbc_actor2);
		actor2.setColumns(10);
		
		actor3 = new JTextField();
		actor3.setMargin(new Insets(3, 3, 3, 3));
		GridBagConstraints gbc_actor3 = new GridBagConstraints();
		gbc_actor3.insets = new Insets(0, 0, 5, 5);
		gbc_actor3.fill = GridBagConstraints.HORIZONTAL;
		gbc_actor3.gridx = 5;
		gbc_actor3.gridy = 7;
		basicInfoP.add(actor3, gbc_actor3);
		actor3.setColumns(10);
		
		JLabel lblNewLabel_4 = new JLabel("상영 시간");
		lblNewLabel_4.setFont(new Font("맑은 고딕", Font.BOLD, 13));
		GridBagConstraints gbc_lblNewLabel_4 = new GridBagConstraints();
		gbc_lblNewLabel_4.insets = new Insets(0, 0, 5, 5);
		gbc_lblNewLabel_4.gridx = 1;
		gbc_lblNewLabel_4.gridy = 9;
		basicInfoP.add(lblNewLabel_4, gbc_lblNewLabel_4);
		
		runningtime = new JTextField();
		runningtime.setMargin(new Insets(3, 3, 3, 3));
		GridBagConstraints gbc_runningtime = new GridBagConstraints();
		gbc_runningtime.fill = GridBagConstraints.HORIZONTAL;
		gbc_runningtime.gridwidth = 2;
		gbc_runningtime.insets = new Insets(0, 0, 5, 5);
		gbc_runningtime.gridx = 3;
		gbc_runningtime.gridy = 9;
		basicInfoP.add(runningtime, gbc_runningtime);
		runningtime.setColumns(10);
		
		JLabel lblNewLabel_5 = new JLabel("분");
		GridBagConstraints gbc_lblNewLabel_5 = new GridBagConstraints();
		gbc_lblNewLabel_5.anchor = GridBagConstraints.WEST;
		gbc_lblNewLabel_5.insets = new Insets(0, 0, 5, 5);
		gbc_lblNewLabel_5.gridx = 5;
		gbc_lblNewLabel_5.gridy = 9;
		basicInfoP.add(lblNewLabel_5, gbc_lblNewLabel_5);
		
		JLabel lblNewLabel_6 = new JLabel("등       급");		
		lblNewLabel_6.setFont(new Font("맑은 고딕", Font.BOLD, 13));
		GridBagConstraints gbc_lblNewLabel_6 = new GridBagConstraints();
		gbc_lblNewLabel_6.insets = new Insets(0, 0, 5, 5);
		gbc_lblNewLabel_6.gridx = 1;
		gbc_lblNewLabel_6.gridy = 11;
		basicInfoP.add(lblNewLabel_6, gbc_lblNewLabel_6);
		
		String[] rating = {"전체 관람가","12세 관람가","15세 관람가","청소년 관람불가"};
		JComboBox ratingCbx = new JComboBox(rating);		
		GridBagConstraints gbc_ratingCbx = new GridBagConstraints();
		gbc_ratingCbx.gridwidth = 3;
		gbc_ratingCbx.insets = new Insets(0, 0, 5, 5);
		gbc_ratingCbx.fill = GridBagConstraints.HORIZONTAL;
		gbc_ratingCbx.gridx = 3;
		gbc_ratingCbx.gridy = 11;
		basicInfoP.add(ratingCbx, gbc_ratingCbx);
		
		JLabel lblNewLabel_7 = new JLabel("개  봉  일");
		lblNewLabel_7.setFont(new Font("맑은 고딕", Font.BOLD, 13));
		GridBagConstraints gbc_lblNewLabel_7 = new GridBagConstraints();
		gbc_lblNewLabel_7.insets = new Insets(0, 0, 0, 5);
		gbc_lblNewLabel_7.gridx = 1;
		gbc_lblNewLabel_7.gridy = 14;
		basicInfoP.add(lblNewLabel_7, gbc_lblNewLabel_7);
		
		String[] year = new String[2];
		for (int i = 0; i < year.length; ++i) {
			year[i] = (2013 + i) + "년";
		}
		JComboBox playYearCbx = new JComboBox(year);
		GridBagConstraints gbc_playYearCbx = new GridBagConstraints();
		gbc_playYearCbx.insets = new Insets(0, 0, 0, 5);
		gbc_playYearCbx.fill = GridBagConstraints.HORIZONTAL;
		gbc_playYearCbx.gridx = 3;
		gbc_playYearCbx.gridy = 14;
		basicInfoP.add(playYearCbx, gbc_playYearCbx);
		
		String[] month = new String[12];
		for (int i = 0; i < 9; ++i) {
			month[i] = "0" + (i + 1) + "월";
		}
		for (int i = 9; i < month.length; ++i) {
			month[i] = (i + 1) + "월";
		}
		JComboBox playMonthCbx = new JComboBox(month);
		GridBagConstraints gbc_playMonthCbx = new GridBagConstraints();
		gbc_playMonthCbx.insets = new Insets(0, 0, 0, 5);
		gbc_playMonthCbx.fill = GridBagConstraints.HORIZONTAL;
		gbc_playMonthCbx.gridx = 4;
		gbc_playMonthCbx.gridy = 14;
		basicInfoP.add(playMonthCbx, gbc_playMonthCbx);
		
		String[] day = new String[31];
		for (int i = 0; i < 9; ++i) {
			day[i] = "0" + (i + 1) + "일";
		}
		for (int i = 9; i < day.length; ++i) {
			day[i] = (i + 1) + "일";
		}
		JComboBox playDayCbx = new JComboBox(day);
		GridBagConstraints gbc_playDayCbx = new GridBagConstraints();
		gbc_playDayCbx.insets = new Insets(0, 0, 0, 5);
		gbc_playDayCbx.fill = GridBagConstraints.HORIZONTAL;
		gbc_playDayCbx.gridx = 5;
		gbc_playDayCbx.gridy = 14;
		basicInfoP.add(playDayCbx, gbc_playDayCbx);
		
		JPanel openFileP = new JPanel();
		openFileP.setPreferredSize(new Dimension(200, 10));
		contentPane.add(openFileP, BorderLayout.EAST);
		GridBagLayout gbl_openFileP = new GridBagLayout();
		gbl_openFileP.columnWidths = new int[] {0, 0, 0, 0, 0};
		gbl_openFileP.rowHeights = new int[] {30, 0, 230, 0, 0, 0};
		gbl_openFileP.columnWeights = new double[]{0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
		gbl_openFileP.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
		openFileP.setLayout(gbl_openFileP);
		
		JLabel lblNewLabel_8 = new JLabel("포스터 이미지");
		lblNewLabel_8.setFont(new Font("맑은 고딕", Font.BOLD, 13));
		GridBagConstraints gbc_lblNewLabel_8 = new GridBagConstraints();
		gbc_lblNewLabel_8.gridwidth = 4;
		gbc_lblNewLabel_8.fill = GridBagConstraints.BOTH;
		gbc_lblNewLabel_8.insets = new Insets(0, 0, 5, 0);
		gbc_lblNewLabel_8.gridx = 0;
		gbc_lblNewLabel_8.gridy = 1;
		openFileP.add(lblNewLabel_8, gbc_lblNewLabel_8);
		
		JPanel panel = new JPanel();
		panel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
		GridBagConstraints gbc_panel = new GridBagConstraints();
		gbc_panel.gridwidth = 4;
		gbc_panel.fill = GridBagConstraints.BOTH;
		gbc_panel.insets = new Insets(0, 0, 5, 0);
		gbc_panel.gridx = 0;
		gbc_panel.gridy = 2;
		openFileP.add(panel, gbc_panel);
		
		JLabel lblNewLabel_9 = new JLabel("파일 이름");
		GridBagConstraints gbc_lblNewLabel_9 = new GridBagConstraints();
		gbc_lblNewLabel_9.insets = new Insets(0, 0, 5, 5);
		gbc_lblNewLabel_9.gridx = 0;
		gbc_lblNewLabel_9.gridy = 3;
		openFileP.add(lblNewLabel_9, gbc_lblNewLabel_9);
		
		filename = new JTextField();
		filename.setMargin(new Insets(3, 3, 3, 3));
		GridBagConstraints gbc_filename = new GridBagConstraints();
		gbc_filename.gridwidth = 3;
		gbc_filename.insets = new Insets(0, 0, 5, 0);
		gbc_filename.fill = GridBagConstraints.HORIZONTAL;
		gbc_filename.gridx = 1;
		gbc_filename.gridy = 3;
		openFileP.add(filename, gbc_filename);
		filename.setColumns(10);
		
		JButton opendirBtn = new JButton("찾아보기");
		opendirBtn.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				JFileChooser fileChooser = new JFileChooser();
				fileChooser.setCurrentDirectory(new File(System.getProperty("user.home")));
				FileNameExtensionFilter filter = new FileNameExtensionFilter("이미지 파일 (*.jpg; *.png; *.gif)", "png", "jpg", "gif");
				fileChooser.setFileFilter(filter);

				int result = fileChooser.showOpenDialog(frame);
				if (result == JFileChooser.APPROVE_OPTION) {
					// user selects a file
				}
				selectedFile = fileChooser.getSelectedFile();
				System.out.println(selectedFile);

				try {
					image = bufferedImage(selectedFile, "친구2");
					System.out.println("ok");
					
				} catch (IOException ex) {
					ex.printStackTrace();
				}

			}
		});
		GridBagConstraints gbc_opendirBtn = new GridBagConstraints();
		gbc_opendirBtn.anchor = GridBagConstraints.EAST;
		gbc_opendirBtn.gridx = 3;
		gbc_opendirBtn.gridy = 4;
		openFileP.add(opendirBtn, gbc_opendirBtn);
		
		JPanel adInfoP = new JPanel();
		adInfoP.setPreferredSize(new Dimension(10, 380));
		contentPane.add(adInfoP, BorderLayout.SOUTH);
		GridBagLayout gbl_adInfoP = new GridBagLayout();
		gbl_adInfoP.columnWidths = new int[]{15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0};
		gbl_adInfoP.rowHeights = new int[] {35, 0, 90, 15, 0, 0, 0, 0, 13, 0, 0, 20, 0, 0};
		gbl_adInfoP.columnWeights = new double[]{0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
		gbl_adInfoP.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
		adInfoP.setLayout(gbl_adInfoP);
		
		JSeparator separator = new JSeparator();
		separator.setEnabled(false);
		separator.setRequestFocusEnabled(false);
		GridBagConstraints gbc_separator = new GridBagConstraints();
		gbc_separator.fill = GridBagConstraints.HORIZONTAL;
		gbc_separator.gridwidth = 11;
		gbc_separator.insets = new Insets(0, 0, 5, 5);
		gbc_separator.gridx = 0;
		gbc_separator.gridy = 0;
		adInfoP.add(separator, gbc_separator);
		
		JLabel lblNewLabel_10 = new JLabel("줄 거 리");
		lblNewLabel_10.setFont(new Font("맑은 고딕", Font.BOLD, 13));
		GridBagConstraints gbc_lblNewLabel_10 = new GridBagConstraints();
		gbc_lblNewLabel_10.anchor = GridBagConstraints.WEST;
		gbc_lblNewLabel_10.insets = new Insets(0, 0, 5, 5);
		gbc_lblNewLabel_10.gridx = 1;
		gbc_lblNewLabel_10.gridy = 1;
		adInfoP.add(lblNewLabel_10, gbc_lblNewLabel_10);
		
		JScrollPane scrollPane = new JScrollPane();
		scrollPane.setPreferredSize(new Dimension(150, 150));
		GridBagConstraints gbc_scrollPane = new GridBagConstraints();
		gbc_scrollPane.gridwidth = 9;
		gbc_scrollPane.insets = new Insets(0, 0, 5, 5);
		gbc_scrollPane.fill = GridBagConstraints.BOTH;
		gbc_scrollPane.gridx = 1;
		gbc_scrollPane.gridy = 2;
		adInfoP.add(scrollPane, gbc_scrollPane);
		
		JTextArea synop = new JTextArea();
		synop.setLineWrap(true);
		scrollPane.setViewportView(synop);
		synop.setPreferredSize(new Dimension(150, 1000));
		
		JLabel lblNewLabel_11 = new JLabel("상 영 정 보");
		lblNewLabel_11.setFont(new Font("맑은 고딕", Font.BOLD, 13));
		GridBagConstraints gbc_lblNewLabel_11 = new GridBagConstraints();
		gbc_lblNewLabel_11.anchor = GridBagConstraints.WEST;
		gbc_lblNewLabel_11.insets = new Insets(0, 0, 5, 5);
		gbc_lblNewLabel_11.gridx = 1;
		gbc_lblNewLabel_11.gridy = 4;
		adInfoP.add(lblNewLabel_11, gbc_lblNewLabel_11);
		
		JLabel lblNewLabel_12 = new JLabel("지  역");
		lblNewLabel_12.setFont(new Font("맑은 고딕", Font.BOLD, 13));
		GridBagConstraints gbc_lblNewLabel_12 = new GridBagConstraints();
		gbc_lblNewLabel_12.anchor = GridBagConstraints.WEST;
		gbc_lblNewLabel_12.insets = new Insets(0, 0, 5, 5);
		gbc_lblNewLabel_12.gridx = 1;
		gbc_lblNewLabel_12.gridy = 6;
		adInfoP.add(lblNewLabel_12, gbc_lblNewLabel_12);
		
		JLabel lblNewLabel_13 = new JLabel("영 화 관");
		lblNewLabel_13.setFont(new Font("맑은 고딕", Font.BOLD, 13));
		GridBagConstraints gbc_lblNewLabel_13 = new GridBagConstraints();
		gbc_lblNewLabel_13.anchor = GridBagConstraints.WEST;
		gbc_lblNewLabel_13.insets = new Insets(0, 0, 5, 5);
		gbc_lblNewLabel_13.gridx = 3;
		gbc_lblNewLabel_13.gridy = 6;
		adInfoP.add(lblNewLabel_13, gbc_lblNewLabel_13);
		
		JLabel lblNewLabel_14 = new JLabel("상 영 관");
		lblNewLabel_14.setFont(new Font("맑은 고딕", Font.BOLD, 13));
		GridBagConstraints gbc_lblNewLabel_14 = new GridBagConstraints();
		gbc_lblNewLabel_14.anchor = GridBagConstraints.WEST;
		gbc_lblNewLabel_14.insets = new Insets(0, 0, 5, 5);
		gbc_lblNewLabel_14.gridx = 5;
		gbc_lblNewLabel_14.gridy = 6;
		adInfoP.add(lblNewLabel_14, gbc_lblNewLabel_14);
		
		MovieSelectDAO md = new MovieSelectDAO();
		MovieVO m = new MovieVO();
		
		
		md.movieArea(m);
		
		JComboBox locationCbx = new JComboBox();
		
		GridBagConstraints gbc_locationCbx = new GridBagConstraints();
		gbc_locationCbx.insets = new Insets(0, 0, 5, 5);
		gbc_locationCbx.fill = GridBagConstraints.HORIZONTAL;
		gbc_locationCbx.gridx = 1;
		gbc_locationCbx.gridy = 7;
		adInfoP.add(locationCbx, gbc_locationCbx);
		
		JComboBox cinemaCbx = new JComboBox();
		GridBagConstraints gbc_cinemaCbx = new GridBagConstraints();
		gbc_cinemaCbx.insets = new Insets(0, 0, 5, 5);
		gbc_cinemaCbx.fill = GridBagConstraints.HORIZONTAL;
		gbc_cinemaCbx.gridx = 3;
		gbc_cinemaCbx.gridy = 7;
		adInfoP.add(cinemaCbx, gbc_cinemaCbx);
		
		JComboBox theaterCbx = new JComboBox();
		GridBagConstraints gbc_theaterCbx = new GridBagConstraints();
		gbc_theaterCbx.insets = new Insets(0, 0, 5, 5);
		gbc_theaterCbx.fill = GridBagConstraints.HORIZONTAL;
		gbc_theaterCbx.gridx = 5;
		gbc_theaterCbx.gridy = 7;
		adInfoP.add(theaterCbx, gbc_theaterCbx);
		
		JLabel lblNewLabel_15 = new JLabel("상영 년도");
		lblNewLabel_15.setFont(new Font("맑은 고딕", Font.BOLD, 13));
		GridBagConstraints gbc_lblNewLabel_15 = new GridBagConstraints();
		gbc_lblNewLabel_15.anchor = GridBagConstraints.WEST;
		gbc_lblNewLabel_15.insets = new Insets(0, 0, 5, 5);
		gbc_lblNewLabel_15.gridx = 1;
		gbc_lblNewLabel_15.gridy = 9;
		adInfoP.add(lblNewLabel_15, gbc_lblNewLabel_15);
		
		JLabel lblNewLabel_16 = new JLabel("월");
		lblNewLabel_16.setFont(new Font("맑은 고딕", Font.BOLD, 13));
		GridBagConstraints gbc_lblNewLabel_16 = new GridBagConstraints();
		gbc_lblNewLabel_16.anchor = GridBagConstraints.WEST;
		gbc_lblNewLabel_16.insets = new Insets(0, 0, 5, 5);
		gbc_lblNewLabel_16.gridx = 3;
		gbc_lblNewLabel_16.gridy = 9;
		adInfoP.add(lblNewLabel_16, gbc_lblNewLabel_16);
		
		JLabel lblNewLabel_17 = new JLabel("일");
		lblNewLabel_17.setFont(new Font("맑은 고딕", Font.BOLD, 13));
		GridBagConstraints gbc_lblNewLabel_17 = new GridBagConstraints();
		gbc_lblNewLabel_17.anchor = GridBagConstraints.WEST;
		gbc_lblNewLabel_17.insets = new Insets(0, 0, 5, 5);
		gbc_lblNewLabel_17.gridx = 5;
		gbc_lblNewLabel_17.gridy = 9;
		adInfoP.add(lblNewLabel_17, gbc_lblNewLabel_17);
		
		JLabel lblNewLabel_18 = new JLabel("시");
		lblNewLabel_18.setFont(new Font("맑은 고딕", Font.BOLD, 13));
		GridBagConstraints gbc_lblNewLabel_18 = new GridBagConstraints();
		gbc_lblNewLabel_18.anchor = GridBagConstraints.WEST;
		gbc_lblNewLabel_18.insets = new Insets(0, 0, 5, 5);
		gbc_lblNewLabel_18.gridx = 7;
		gbc_lblNewLabel_18.gridy = 9;
		adInfoP.add(lblNewLabel_18, gbc_lblNewLabel_18);
		
		JLabel lblNewLabel_19 = new JLabel("분");
		lblNewLabel_19.setFont(new Font("맑은 고딕", Font.BOLD, 13));
		GridBagConstraints gbc_lblNewLabel_19 = new GridBagConstraints();
		gbc_lblNewLabel_19.insets = new Insets(0, 0, 5, 5);
		gbc_lblNewLabel_19.anchor = GridBagConstraints.WEST;
		gbc_lblNewLabel_19.gridx = 9;
		gbc_lblNewLabel_19.gridy = 9;
		adInfoP.add(lblNewLabel_19, gbc_lblNewLabel_19);
		
		JComboBox yearCbx = new JComboBox();
		GridBagConstraints gbc_yearCbx = new GridBagConstraints();
		gbc_yearCbx.insets = new Insets(0, 0, 5, 5);
		gbc_yearCbx.fill = GridBagConstraints.HORIZONTAL;
		gbc_yearCbx.gridx = 1;
		gbc_yearCbx.gridy = 10;
		adInfoP.add(yearCbx, gbc_yearCbx);
		
		JComboBox monthCbx = new JComboBox();
		GridBagConstraints gbc_monthCbx = new GridBagConstraints();
		gbc_monthCbx.insets = new Insets(0, 0, 5, 5);
		gbc_monthCbx.fill = GridBagConstraints.HORIZONTAL;
		gbc_monthCbx.gridx = 3;
		gbc_monthCbx.gridy = 10;
		adInfoP.add(monthCbx, gbc_monthCbx);
		
		JComboBox dayCbx = new JComboBox();
		GridBagConstraints gbc_dayCbx = new GridBagConstraints();
		gbc_dayCbx.insets = new Insets(0, 0, 5, 5);
		gbc_dayCbx.fill = GridBagConstraints.HORIZONTAL;
		gbc_dayCbx.gridx = 5;
		gbc_dayCbx.gridy = 10;
		adInfoP.add(dayCbx, gbc_dayCbx);
		
		JComboBox hourCbx = new JComboBox();
		GridBagConstraints gbc_hourCbx = new GridBagConstraints();
		gbc_hourCbx.insets = new Insets(0, 0, 5, 5);
		gbc_hourCbx.fill = GridBagConstraints.HORIZONTAL;
		gbc_hourCbx.gridx = 7;
		gbc_hourCbx.gridy = 10;
		adInfoP.add(hourCbx, gbc_hourCbx);
		
		JComboBox minCbx = new JComboBox();
		GridBagConstraints gbc_minCbx = new GridBagConstraints();
		gbc_minCbx.insets = new Insets(0, 0, 5, 5);
		gbc_minCbx.fill = GridBagConstraints.HORIZONTAL;
		gbc_minCbx.gridx = 9;
		gbc_minCbx.gridy = 10;
		adInfoP.add(minCbx, gbc_minCbx);
		
		JPanel panel_1 = new JPanel();
		GridBagConstraints gbc_panel_1 = new GridBagConstraints();
		gbc_panel_1.gridwidth = 9;
		gbc_panel_1.insets = new Insets(0, 0, 0, 5);
		gbc_panel_1.fill = GridBagConstraints.BOTH;
		gbc_panel_1.gridx = 1;
		gbc_panel_1.gridy = 12;
		adInfoP.add(panel_1, gbc_panel_1);
		
		JButton submitBtn = new JButton("등 록");
		panel_1.add(submitBtn);
		
		JButton cancelBtn = new JButton("취 소");
		panel_1.add(cancelBtn);
	}
	
	private BufferedImage bufferedImage(File f, String t) throws IOException {
		image = ImageIO.read(f);
		File file1 = new File("./src/images/" + t + ".png");
		ImageIO.write(image, "png", file1);
		return image;
	}

}
